package com.bite.product.controller;


import com.bite.product.mapper.ProductMapper;
import com.bite.product.model.ProductInfo;
import com.bite.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.security.interfaces.RSAKey;

@RequestMapping("/product")
@RestController
public class ProductController {
    @Autowired
    private ProductService productService;

    @RequestMapping("/{productId}")
    public ProductInfo selectById(@PathVariable("productId") Integer productId) {
        return productService.selectById(productId);
    }
}
